|
|
|
|
|
|
|
· The HAVING clause: Used only with the GROUP BY clause, the HAVING clause acts as a WHERE clause for the GROUP BY subtotal clause (for example, GROUP BY Name HAVING SUM(SalesTotal)>1000). |
|
|
|
|
|
|
|
|
· The INNER JOIN clause: Used to join two tables together into a single, updateable result set. The INNER JOIN returns rows that have a corresponding match in both tables. |
|
|
|
|
|
|
|
|
· The LEFT JOIN and RIGHT JOIN clauses: Used to join two tables into a single, updateable result set. The LEFT JOIN includes all records from the first (left-hand) table and all rows from the second table that have a corresponding match. The RIGHT JOIN works in reverse. |
|
|
|
|
|
|
|
|
· The UNION clause: Used to combine two or more complete SQL queries into a single result set (for example, SELECT * FROM Table1 UNION SELECT * FROM Table2). |
|
|
|
|
|
|
|
|
· The TRANSFORM_PIVOT clause: Used to create a crosstab query as a result set (for example, TRANSFORM SUM(MonthlySales) FROM SalesTable GROUP BY Product PIVOT Month). |
|
|
|
|
|
|
|
|
You also learned about additional SQL keywords that you can use to control the contents of the result set: |
|
|
|
|
|
|
|
|
·BETWEEN_AND logical operators |
|
|
|
|
|
|
|
|
·DISTINCT and DISTINCTROW |
|
|
|
|
|
|
|
|
·AS to rename columns in the result set |
|
|
|
|
|
|
|
|
· The SQL aggregate functions AVG, COUNT, MAX, MIN, and SUM |
|
|
|
|
|
|
|
|
Finally, you learned about the SQL subquery, and how to nest SELECT statements to extract data from a table based upon the results of another SELECT statement. |
|
|
|
|
|
|
|
|
1. What does SQL stand for? How is SQL pronounced? |
|
|
|
|
|
|
|
|
2. What SQL statement enables you to select data from table fields? |
|
|
|
|
|
|
|
|
3. What wildcard character do you use in a SELECT_FROM statement to include all fields of a table in your result? |
|
|
|
|
|
|
|
|
4. What clause do you use in an SQL statement to sort the displayed data? |
|
|
|
|
|
|
|
|
5. Identify two functions that a WHERE clause performs in an SQL statement? |
|
|
|
|
|
|
|
|
6. How do you rename the column headings in an SQL statement? |
|
|
|
|
|
|
|
|
7. What are SQL aggregate functions? List the SQL aggregate functions available through the Microsoft Access Jet database engine. |
|
|
|
|
|